# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor:  Yangtse Su<yangtsesu@gmail.com>
# Contributor:  Jekyll Wu<adaptee [at] gmail [dot] com>
# Contributor: riverscn<riverscn at gmail.com>
# Contributor: rainy<rainylau at gmail.com>
# Contributor: Lee.MaRS<leemars at gmail.com>

pkgname=ibus-libpinyin
pkgver=1.15.2
_commit=efd72e9b24632eb528b9b4cd4a0dc71364e1708e
pkgrel=2
pkgdesc="Intelligent Pinyin engine based on libpinyin for IBus"
arch=('loong64' 'x86_64')
license=('LGPL')
url="https://github.com/libpinyin/ibus-libpinyin"
depends=('ibus' 'libpinyin' 'libsoup' 'lua' 'opencc' 'python-pyxdg')
makedepends=('boost' 'git' 'gnome-common' 'intltool')
source=("git+https://github.com/libpinyin/ibus-libpinyin.git#commit=$_commit")
sha512sums=('SKIP')

build() {
  cd $pkgname
  ./autogen.sh --prefix=/usr --libexecdir=/usr/lib/$pkgname --enable-boost --enable-opencc --enable-cloud-input-mode
  make
}

package() {
  cd $pkgname
  make NO_INDEX=true DESTDIR="$pkgdir" install
}
